package com.chinacoal.microservice.fallback;

import com.chinacoal.microservice.RoomManagementClient;
import com.chinacoal.microservice.pojo.CcmsSmartleasingDeviceChange;
import com.chinacoal.microservice.pojo.CcmsSmartleasingRoom;
import com.chinacoal.microservice.util.CodeMsg;
import com.chinacoal.microservice.util.QueryCriteria;
import com.chinacoal.microservice.util.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 房源管理-房间管理-异常回退类
 * @date 2020-11-12 10：30
 */
@Component
public class RoomManagementClientFallback implements RoomManagementClient {

    /**
     * @Description: 查询所有的房间信息（带分页），异常回退类
     * @author zhuliang
     * @date 2020/11/12 10:53
     */
    @Override
    public Result<List<CcmsSmartleasingRoom>> getListByPage(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据房间id查询房间信息，异常回退类
     * @author zhuliang
     * @date 2020/11/12 11:24
     */
    @Override
    public Result<CcmsSmartleasingRoom> getRoomById(String pkRoomId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 添加房间信息，异常回退类
     * @author zhuliang
     * @date 2020/11/12 11:35
     */
    @Override
    public Result addRoom(String token, CcmsSmartleasingRoom room) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 修改房间信息，异常回退类
     * @author zhuliang
     * @date 2020/11/12 11:41
     */
    @Override
    public Result updateRoom(String token, CcmsSmartleasingRoom room) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据房间id批量删除房间信息,异常回退类
     * @author zhuliang
     * @date 2020/11/12 11:46
     */
    @Override
    public Result deleteRoom(String token, String deleteId) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 条件查询（带分页），异常回退类
     * @author zhuliang
     * @date 2020/11/12 17:35
     */
    @Override
    public Result<List<CcmsSmartleasingRoom>> queryRoomManagement(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 修改出租信息
     * @author zhuliang
     * @date 2020/12/2 15:03
     */
    @Override
    public Result updateByRent(CcmsSmartleasingRoom room, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    @Override
    public Result addDeviceChange(String token, CcmsSmartleasingDeviceChange deviceChange) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    @Override
    public Result<List<CcmsSmartleasingDeviceChange>> getDeviceChangesByRoomId_CurrentMonth(String pkRoomId, String bCurrentMonth,String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }
}
